<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>用户端-用户信息</title>
    <link rel="stylesheet" href="/layui2_9/css/layui.css">
</head>
<body>
<!-- 内容主体区域-->
<div class="layui-container">
    <div class="layui-row">
        <div class="layui-col-md12">
            <span class="layui-badge-dot"></span> <span
                class="layui-badge-dot layui-bg-orange"></span> <span
                class="layui-badge-dot layui-bg-green"></span> <span
                class="layui-badge-dot layui-bg-cyan"></span> <span
                class="layui-badge-dot layui-bg-blue"></span> <span
                class="layui-badge-dot layui-bg-black"></span> <span
                class="layui-badge-dot layui-bg-gray"></span>
            <fieldset class="layui-elem-field layui-field-title"
                      style="margin-top: 30px;">
                <legend>该用户信息</legend>
            </fieldset>
        </div>
    </div>

    <div class="layui-row">
        <div class="layui-col-md12">
            <fieldset class="layui-elem-field">
                <!--  <div class="layui-field-box">-->
                <table class="layui-table" lay-size="lg" lay-skin="line" style="margin-bottom: 0px;">
                    <tbody>
                    <tr>
                        <td>
                            <img id="path" src="/layui2_9/images/user01.jpg" alt="" class="layui-circle" style="width: 150px; height: auto;">

                            <script>
                                var path = sessionStorage.getItem("path");
                                var img = document.getElementById("path");
                                img.src = path;
                            </script>
                        </td>
                    </tr>
                    <tr>
                        <td>用户编号</td>
                        <td th:text="${user.user_id}">1</td>
                    </tr>
                    <tr>
                        <td>用户姓名</td>
                        <td id="username" th:text="${user.user_name}">小灰</td>

                        <script>
                            var username = sessionStorage.getItem("username");
                            var td = document.getElementById("username");
                            td.innerText = username;
                        </script>
                    </tr>
                    <tr>
                        <td>用户性别</td>
                        <td th:text="${user.getUser_gender()}">男</td>
                    </tr>
                    <tr>
                        <td>年龄</td>
                        <td th:text="${user.getAge()}">24</td>
                    </tr>
                    <tr>
                        <td>星座</td>
                        <td th:text="${user.getConstellation()}">金牛座</td>
                    </tr>
                    <tr>
                        <td>所在大学</td>
                        <td th:text="${user.getSchool()}">南昌大学</td>
                    </tr>
                    <tr>
                        <td>专业</td>
                        <td th:text="${user.getMajor()}">软件工程</td>
                    </tr>
                    <tr>
                        <td>自我介绍</td>
                        <td th:text="${user.getSelf_introduction()}">我是一个具有2年工作经验的Java软件工程师。</td>
                    </tr>
                    </tbody>
                </table>
                <!--</div>-->
            </fieldset>

        </div>
    </div>
</div>

<script src="/layui2_9/layui.js"></script>
<script>
    //JavaScript代码区域
    layui.use('element', function () {
        var element = layui.element;
        //监听导航点击
        element.on('nav(test)', function (elem) {
            //console.log(elem)
            layer.msg(elem.text());
        });
    });
</script>
</body>
</html>
